package page;

/**
 * Created by as on 2016/11/16.
 */
public class Book {
    String name;
    double price;
    String author;
    Book()
    {
        System.out.print("这个是默认的构造函数");
    }
    Book(String name, double price, String author)
    {
        this.name   = name;
        this.price  = price;
        this.author = author;
    }
    void show(){
        System.out.println("书名："+name);
        System.out.println("作者："+author);
        System.out.println("定价："+price);
        System.out.println("- - - - - - - - - - - - - - -");
    }
    double sellPrice(double discount){
        return price*discount;
    }
}
